package com.junbao.message.domain.enums;

public enum ACKFlag {

	NEED(0,"需要进行ack"),
	NO_NEED(1,"不需要进行ack");
	
	private Integer code;
	
	private String message;
	
	ACKFlag(Integer code,String message){
		this.code = code;
		this.message = message;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	
	public static ACKFlag getACKFlagByCode(int code){
		switch (code) {
		case 0:
			return NEED;
		case 1:
			return NO_NEED;
		}
		return null;
	}
}
